1. Field of the Invention
The present invention relates to a ternary content addressable memory.
2. Description of the Prior Art
A content addressable memory (CAM) is a form of memory that can be searched based on the content stored in the memory. In contrast to a standard memory which is searched by inputting an address identifying the memory location at which the required data value is stored, for a content addressable memory a data value is input and the CAM searches its memory locations to see whether that data value is stored. If the data value is stored, then an indication of the location storing the data value is output.
Ternary content addressable memory (TCAM) is a form of content addressable memory in which each memory cell can store one of three states—the 0 and 1 states of a binary content addressable memory and an additional “don't care” state which is considered to match against either 0 or 1 when the TCAM is searched. Similarly, a “don't care” value can be input to the TCAM when searching, and any bits set to “don't care” will be considered to match against a corresponding stored bit irrespective of the state of the stored bit. A TCAM is useful for searching for any of a set of data values which share some but not all bit values, in a single search operation.
The present technique aims to provide an improved ternary content addressable memory.